<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="./reactive.js"></script>
</head>
<body>
  <script>
    var obj = {name:"张三",age:14}
    const proxy = reactive(obj)
    effect(()=>{
      console.log("proxy.name==>",proxy.name);
    })


    effect(()=>{
      console.log("proxy.age===>",proxy.age);
    })


    const p2 = reactive({name:'旺财',age:2})
    
    effect(()=>{
      console.log("p2.name===>",p2.name);
    })

    setTimeout(() => {
      proxy.name = '李四'
    }, 3000);
  </script>
</body>
</html>